Limit Switch Decoder block

The Limit Switch Decoder is used to correct the signals from a pair of limit switch signals for instruments such as a valve.

Return to Overview of blocks

Limit Switch Decoder block

Description

The limit switch decoder is used to correct the signals from a pair of limit switch signals for instruments such as a valve. During normal operation either the upper limit switch is close ( 1 ) and the lower limit switch is open ( 0 ) or the upper limit switch is open ( 0 ) and the lower limit switch is close ( 1 ). Both switches may also be open, indicating a transition.

The limit switch decoder block is used to filter and clean the two indicator signals as a combination. The quality of the signals is also taken into account when cleaning the signals. The output is 2 clean signals, one for the upper limit switch and one for the lower limit switch.
The block may also be used in any situation where 2 complimentary binary signals can be used to validate and reconstruct themselves.

diagram showing the Limit Switch Decoder block

Block Type

Data Transformation block

Input/Output ports

The input port may contain only integer fields.

The output port will have 2 fields, one for the upper limit switch and one for the lower limit switch.

In order for this block to run,

  • The input port must be connected to a port that only has integer fields;

  • the upper and lower limit switch signals must be selected; and

  • 2 valid output field names must be specified for the output fields.

Return to top

Functions performed on tags

  • On the values - The output values are either 0 or 1. A 0 indicates that the limit switch is open. A 1 indicates that the limit switch is closed

  • On the timestamp - The current execution time stamp is applied to both output fields

  • On the quality - The quality is set to bad when the inputs and previous state results in ambiguous outputs.

Example

Discrete devices such as two-position valves can be driven to either of two possible states. Such devices can be optionally outfitted with limit switches that indicate the state of the device and detect the component’s relative position. For two-position valves, the following combinations are possible: 

  1. No limit switches

  2. One limit switch on the closed position

  3. One limit switch on the open position

  4. Two limit switches

Return to top

In process-control terminology, the discrete device driver is the software routine that generates the output to a discrete device such as a valve and also monitors the state feedback information to ascertain that the discrete device actually attains the desired state. Given the variety of discrete devices used in batch facilities, this logic must include a variety of capabilities. For example, valves do not instantly change states, but instead each valve exhibits a travel time for the change from one state to another. To accommodate this characteristic of the field device, the processing logic within the discrete device driver must provide for a user-specified transition time for each field device. When equipped with limit switches, the potential states for a valve are as follows:

  1. Open. The valve has been commanded to open, and the limit switch inputs are consistent with the open state.

  2. Closed. The valve has been commanded to close, and the limit switch inputs are consistent with the closed state.

  3. Transition. This is a temporary state that is only possible after the valve has been commanded to change state. The limit switch inputs are not consistent with the commanded state, but the transition time has not expired.

  4. Invalid. The transition time has expired, and the limit switch inputs are not consistent with the commanded state for the valve. The invalid state is an abnormal condition that is generally handled in a manner similar to process alarms. The transition state is not considered to be an abnormal state but may be implemented in either of the following ways:

    1. Drive and wait. Further actions are delayed until the device attains its commanded state.

    1. Drive and proceed. Further actions are initiated while the device is in the transition state. This is generally necessary for devices with long travel times, such as flush-fitting reactor discharge valves that are motor-driven.

    2. The TS postscript indicates a timestamp field.

    3. The Q postscript indicates a quality field.

Return to top


Related topics:

  

CSense 2023- Last updated: June 24,2025